package com.poly.system.pojo.dto;

import com.poly.common.core.validate.Add;
import com.poly.common.core.validate.Update;
import com.poly.common.core.web.domain.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Size;

/**
 * 应用菜单对象 sys_app_menu
 *
 * @author poly
 * @date 2024-01-02
 */
@ApiModel(value = "SysAppMenuDTO", description = "应用菜单")
@Data
public class SysAppMenuDTO extends BaseDTO {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @ApiModelProperty("${column.columnComment}")
    private Long id;

    /**
     * 上级编号
     */
    @ApiModelProperty("上级编号")
    private Long parentId;

    /**
     * 名称
     */
    @ApiModelProperty("名称")
    @Size(message = "名称长度必须小于64个字符", max = 64, groups = {Add.class, Update.class})
    //@Pattern(message = "名称格式不正确",regexp = “<正则表达式>”,groups = {Add.class,Update.class})
    private String name;

    /**
     * 图标
     */
    @ApiModelProperty("图标")
    @Size(message = "图标长度必须小于1024个字符", max = 1024, groups = {Add.class, Update.class})
    //@Pattern(message = "图标格式不正确",regexp = “<正则表达式>”,groups = {Add.class,Update.class})
    private String icon;

    /**
     * 组件路由
     */
    @ApiModelProperty("组件路由")
    @Size(message = "组件路由长度必须小于1024个字符", max = 1024, groups = {Add.class, Update.class})
    //@Pattern(message = "组件路由格式不正确",regexp = “<正则表达式>”,groups = {Add.class,Update.class})
    private String component;

    /**
     * 组件路由参数
     */
    @ApiModelProperty("参数")
    @Size(message = "参数长度必须小于255个字符", max = 255, groups = {Add.class, Update.class})
    //@Pattern(message = "组件路由格式不正确",regexp = “<正则表达式>”,groups = {Add.class,Update.class})
    private String params;

    /**
     * 序号
     */
    @ApiModelProperty("序号")
    private Long sort;

    /**
     * 授权类型（0公开，1角色授权
     */
    @ApiModelProperty("授权类型（0公开，1角色授权")
    private Integer authType;

    /**
     * 包名
     */
    @ApiModelProperty("包名")
    @Size(message = "包名长度必须小于64个字符", max = 64, groups = {Add.class, Update.class})
    //@Pattern(message = "包名格式不正确",regexp = “<正则表达式>”,groups = {Add.class,Update.class})
    private String packageName;

    /**
     * 状态
     */
    @ApiModelProperty("状态")
    private Integer status;


}
